{extend name='admin@main'}

{block name="button"}
{if auth("store/package/add")}
<button data-open='{:url("add")}' data-title="添加" class='layui-btn layui-btn-sm layui-btn-primary'>添加</button>
{/if}
{/block}

<style>
.nowrap{ white-space:pre-wrap !important;	}
</style>

{block name="content"}
<div class="think-box-shadow">
    {include file='package/index_search'}
    <table class="layui-table margin-top-10" lay-skin="line">
        {notempty name='list'}
        <thead>
        <tr>
            <th class='list-table-check-td think-checkbox'>
                <input data-auto-none data-check-target='.list-check-box' type='checkbox'>
            </th>
            <th class='list-table-sort-td'>
                <button type="button" data-reload class="layui-btn layui-btn-xs">刷 新</button>
            </th>
            <th class='text-left nowrap' width="250px">名称</th>
            <th class='text-left nowrap' width="250px">品系</th>
            <th class='text-left nowrap' width="250px">症状</th>
            <th class='text-left nowrap' width="250px">项目</th>
            <th class='text-left nowrap' width="50px">价格</th>
            <th class='text-left nowrap' width="250px">标签</th>

            <th class='text-left nowrap' width="20%">操作</th>
        </tr>
        </thead>
        {/notempty}
        <tbody>
        {foreach $list as $key=>$vo}
        <tr data-dbclick>
            <td class='list-table-check-td think-checkbox'><input class="list-check-box" value='{$vo.id}' type='checkbox'></td>
            <td class='list-table-sort-td'><input data-action-blur="{:request()->url()}" data-value="id#{$vo.id};action#sort;sort#{value}" data-loading="false" value="{$vo.sort}" class="list-sort-input"></td>

<!--            <td class='text-left nowrap'><span style="line-height: 60px">{$vo.id|default='--'}</span></td>
-->            
            <td class='text-left ' style="width:250px">{$vo.title|default='--'}<br />{$vo.create_at|default='--'}</td>
            <td class='text-left ' style="width:250px">{$vo.cate_name|default='--'}</td>
            <td class='text-left ' style="width:250px">{$vo.symptom_name|default='--'}</td>
            <td class='text-left ' style="width:250px">{$vo.project_name|default='--'}</td>
            <td class='text-left ' style="width:50px">{$vo.total_price|default='--'}</td>
            <td class='text-left ' style="width:250px">{$vo.brand_name|default='--'}</td>


            <td class='text-left nowrap'>

                <div class="nowrap margin-bottom-5">
                    {if auth("store/package/edit")}
                    <a data-dbclick class="layui-btn layui-btn-sm" data-open='{:url("edit")}?id={$vo.id}'>编 辑</a>
                    {else}
                    <a data-tips-text="您没有编辑的权限哦！" class="layui-btn layui-btn-sm layui-btn-primary layui-disabled">编 辑</a>
                    {/if}

                    {if auth("store/package/remove")}
                    <a class="layui-btn layui-btn-sm layui-btn-danger" data-confirm="确定要删除数据吗?" data-action="{:url('remove')}" data-value="id#{$vo.id}">删 除</a>
                    {/if}
                </div>

            </td>
        </tr>
        {/foreach}
        </tbody>
    </table>

    {empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}

</div>
{/block}
